Skip to content

k8s healthcheck#53

Merged
eduardo-munoz-dremio merged 2 commits into
mainfrom
INF-4113-healthcheck-endpoint
Aug 28, 2025
Merged

k8s healthcheck#53
eduardo-munoz-dremio merged 2 commits into
mainfrom
INF-4113-healthcheck-endpoint

Conversation

@eduardo-munoz-dremio
Copy link
Copy Markdown
Contributor

Add a k8s like healthcheck

@eduardo-munoz-dremio eduardo-munoz-dremio self-assigned this Aug 27, 2025
Copy link
Copy Markdown
Contributor

@aniket-s-kulkarni aniket-s-kulkarni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eduardo-munoz-dremio Changes look good, but can you pl add a unit test like this -

diff --git a/tests/e2e/test_mcp_e2e.py b/tests/e2e/test_mcp_e2e.py
index f3255ab..0df3a57 100644
--- a/tests/e2e/test_mcp_e2e.py
+++ b/tests/e2e/test_mcp_e2e.py
@@ -19,6 +19,8 @@ from conftest import http_streamable_client_server, http_streamable_mcp_server
 
 from dremioai.tools.tools import get_tools
 from dremioai.config import settings
+from urllib.parse import urlparse
+from httpx import AsyncClient
 
 
 @pytest.mark.asyncio
@@ -30,3 +32,15 @@ async def test_basic(mock_config_dir, logging_server, logging_level):
             assert tr == {
                 t.__name__ for t in get_tools(For=settings.instance().tools.server_mode)
             }
+
+
+@pytest.mark.asyncio
+async def test_basic(mock_config_dir, logging_server, logging_level):
+    async with http_streamable_mcp_server(logging_server, logging_level) as sf:
+        async with AsyncClient() as client:
+            r = await client.get(
+                urlparse(sf.mcp_server.url)._replace(path="/healthz").geturl()
+            )
+            assert (
+                r.status_code == 200
+            ), f"/healthz failed with {r.text}, {r.status_code}"

@eduardo-munoz-dremio eduardo-munoz-dremio merged commit 94ea531 into main Aug 28, 2025
3 checks passed
@eduardo-munoz-dremio eduardo-munoz-dremio deleted the INF-4113-healthcheck-endpoint branch August 28, 2025 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants